from sqlalchemy.sql.elements import False_
from myblog.controller.article import articleController
from myblog.controller.admin import adminController
from myblog import app, db
from myblog.model.article import Article
from myblog.model.admin import Admin
from myblog.model.label import Label
from myblog.model.comment import Comment


db.init_app(app)  # 这个就是专为解决循环引用而出现的方法

db.create_all()  # 创建数据表


@app.route('/')
def hello_world():
    return 'Hello World!'


app.register_blueprint(articleController, url_prefix='/article')
app.register_blueprint(adminController, url_prefix='/user')


if __name__ == '__main__':
    app.run(debug=False)
